<template>
<!-- pages/messages/mesg_detail/mesg_detail.wxml -->
<view class="mesg_detail">
	<view class="mesgdeta_tit"><text>{{mesgdetails.message_title}}</text></view>
    <view class="mesg_info">
        <text class="mesg_type">类型：通知消息</text>
        <text class="mesgdeta_time">{{mesgdetails.send_time_texts}}</text>
    </view>
    <view class="mesg_con">{{mesgdetails.message_content}}</view>
</view>
</template>

<script>
// pages/messages/mesg_detail/mesg_detail.js
var app = getApp();
var request = app.globalData.request;

export default {
  data() {
    return {
      mesgdetails: null,
      recId: null
    };
  },

  components: {},
  props: {},
  onLoad: function (options) {
    var recId = options.rec_id;
    this.setData({
      recId: recId
    });
    this.getMessageDetail();
  },
  methods: {
    getMessageDetail: function () {
      var that = this;
      var requestUrl = '/index.php?m=Api&c=Message&a=getMessageDetails&rec_id=' + this.recId;
      request.get(requestUrl, {
        success: function (res) {
          that.setData({
            mesgdetails: res.data.result
          });
        }
      });
    }
  }
};
</script>
<style>
page{
    background: white;
}
.mesg_detail{ 
    width:92%; 
    height:auto; 
    text-align:center; 
    padding:0 4%; 
    padding-top:60rpx;
}
.mesg_detail .mesgdeta_tit{ 
    font-size:36rpx; 
    color:#333; 
    font-weight:bold; 
    letter-spacing:4rpx; 
    line-height:48rpx;
}
.mesg_info{
    color: #999;
    font-size:24rpx;
    line-height:30rpx;
    margin:30rpx 0;
}
.mesg_info .mesg_type{ 
    margin-right:30rpx;
}
.mesg_con{ 
    min-height: 500rpx;
    font-size:30rpx; 
    color:#333; 
    line-height:42rpx; 
    text-align:justify;
}
.mesg_con img{ 
    max-width:100%; 
    height:auto; 
    margin:30rpx 0;
}
</style>